//
//  BaseManager.h
//  YunboPro
//
//  Created by leo on 9/22/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ManagerAdapter.h"
#import "QOauthKey.h"


@interface BaseManager : NSObject {
    NSString *appKey;
	NSString *appSecret;
    NSString *requesttokenKey;
    NSString *requesttokenSecret;
	NSString *tokenKey;
	NSString *tokenSecret;
	NSString *verifier;
	NSString *VERIFY_URL ;
	NSString *response;
    NSString *acces_token_url;
    NSString *request_token_url;
      
    
}

@property (nonatomic, copy) NSString *appKey;
@property (nonatomic, copy) NSString *appSecret;
@property (nonatomic, copy) NSString *tokenKey;
@property (nonatomic, copy) NSString *tokenSecret;
@property (nonatomic, copy) NSString *verifier;
@property (nonatomic, copy) NSString *response;
@property (nonatomic, copy) NSString *VERIFY_URL;
@property (nonatomic, copy) NSString *acces_token_url;
@property (nonatomic, copy) NSString *request_token_url;
@property (nonatomic, copy) NSString *requesttokenKey;
@property (nonatomic, copy) NSString *requesttokenSecret;
-(QOauthKey*)getOauthKey;

- (void)parseTokenKeyWithResponse:(NSString *)response;

- (void)saveDefaultKey;

- (void)loadDefaultKey;
//Get request token
- (NSString *)getRequestToken;

//Get access token
- (NSString *)getAccessTokenWithVerify:(NSString *)aVerify;


- (BOOL) isLogin;

- (NSURLRequest*) getURLRequest;

-(BOOL)VerifyRequest:(NSURLRequest *)request;

+(id)instance;
-(id)initWithDefault;
//Get MSG
- (NSArray *)getHomeMsgWithPageFlage:(PageFlag)aPageFlag 
                             nReqNum:(NSInteger)aReqNum;
@end
